/*
 *  Tuan Anh Nguyen.  Email: t.nguyen@latrobe.edu.au
 * Computer Science & Computer Engineering Department
 * La Trobe University, VIC, 3086
 */

/*
 * PBVC.java
 *
 * Created on 17/12/2009, 11:52:50 AM
 */

package placecommframework.communitysetup;
import com.hp.hpl.jena.sparql.core.ResultBinding;
import utilities.*;
import jade.MicroBoot;
import jade.core.MicroRuntime;
import jade.core.Agent;
import jade.util.leap.Properties;
import org.openrdf.model.Value;
import org.openrdf.query.Query;
import org.openrdf.query.QueryLanguage;
import sesame_jena_adapter.jena.rql.*;
 

/**
 *
 * @author Tuan Nguyen
 */
public class PBVC extends javax.swing.JDialog {

    /** Creates new form PBVC */
    public PBVC(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        btnRefresh.setMnemonic('R');
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tpPBVCTabsPanel = new javax.swing.JTabbedPane();
        pPlaceManager = new javax.swing.JPanel();
        taMessage1 = new java.awt.TextArea();
        tfLat = new java.awt.TextField();
        lbPlaceCategory = new java.awt.Label();
        lbTaggedByPeople = new java.awt.Label();
        choicePlaceCategory = new java.awt.Choice();
        lbTaggedByDevices = new java.awt.Label();
        lbPlaceName = new java.awt.Label();
        lbPlaceTaggedByPeople = new java.awt.Label();
        tfPlaceName = new java.awt.TextField();
        lstPeople = new java.awt.List();
        lbPlaceMessage = new java.awt.Label();
        lbLongitude = new java.awt.Label();
        lbDiameter = new java.awt.Label();
        tfLon = new java.awt.TextField();
        lstTagDevice = new java.awt.List();
        lbTaggedDevices = new java.awt.Label();
        btnDeletePlace = new java.awt.Button();
        btnClose = new java.awt.Button();
        tfDiameter = new java.awt.TextField();
        btnCreatPlace = new java.awt.Button();
        lbLatitude = new java.awt.Label();
        pPBVCControlPanel = new javax.swing.JPanel();
        lbStartPlatform = new javax.swing.JLabel();
        btnStartPlatform = new javax.swing.JButton();
        lbStartPBVCAgent = new javax.swing.JLabel();
        btnStartPBVCAgent = new javax.swing.JButton();
        lbStartContextAgent = new javax.swing.JLabel();
        btnStartContextAgent = new javax.swing.JButton();
        btnStartPlaceAgent = new javax.swing.JButton();
        lbStartPlaceAgent = new javax.swing.JLabel();
        lbLoadNewAgent = new javax.swing.JLabel();
        btnLoadAgent = new javax.swing.JButton();
        btnStartSensorAgents = new javax.swing.JButton();
        lbStartSensorAgent = new javax.swing.JLabel();
        tfAgentJar = new javax.swing.JTextField();
        lbSelectAgent = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        taMessage = new javax.swing.JTextArea();
        cbbAgents = new javax.swing.JComboBox();
        cbbProtocols = new javax.swing.JComboBox();
        lbProtocol = new javax.swing.JLabel();
        lbMessages = new javax.swing.JLabel();
        btnComposeMessage = new javax.swing.JButton();
        btnSend = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        taSystemMessage = new javax.swing.JTextArea();
        jButton1 = new javax.swing.JButton();
        lbSystemMessage = new javax.swing.JLabel();
        btnDummyAgent = new javax.swing.JButton();
        pQueryBuilder = new javax.swing.JPanel();
        lbPrefix = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        lstPrefix = new javax.swing.JList();
        lbWhere = new javax.swing.JLabel();
        tfSubject = new javax.swing.JTextField();
        cbbPredicate = new javax.swing.JComboBox();
        tfObject = new javax.swing.JTextField();
        lbFilter = new javax.swing.JLabel();
        tfFilter = new javax.swing.JTextField();
        cbTimeConcerns = new javax.swing.JCheckBox();
        tfTimestamp2 = new javax.swing.JTextField();
        tfTimestamp1 = new javax.swing.JTextField();
        lbTimestamp1 = new javax.swing.JLabel();
        lbTimestamp2 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        taSPARQL = new javax.swing.JTextArea();
        btnGenerateSPARQL = new javax.swing.JButton();
        btnParseSPARQL = new javax.swing.JButton();
        btnExecute = new javax.swing.JButton();
        tfSelect = new javax.swing.JTextField();
        lbSelect = new javax.swing.JLabel();
        lbWhere1 = new javax.swing.JLabel();
        tfSubject1 = new javax.swing.JTextField();
        cbbPredicate1 = new javax.swing.JComboBox();
        tfObject1 = new javax.swing.JTextField();
        lbWhere2 = new javax.swing.JLabel();
        tfSubject2 = new javax.swing.JTextField();
        cbbPredicate2 = new javax.swing.JComboBox();
        tfObject2 = new javax.swing.JTextField();
        lbWhere3 = new javax.swing.JLabel();
        tfSubject3 = new javax.swing.JTextField();
        cbbPredicate3 = new javax.swing.JComboBox();
        tfObject3 = new javax.swing.JTextField();
        lbWhere4 = new javax.swing.JLabel();
        tfSubject4 = new javax.swing.JTextField();
        cbbPredicate4 = new javax.swing.JComboBox();
        tfObject4 = new javax.swing.JTextField();
        btnClear = new javax.swing.JToggleButton();
        btnReserved = new javax.swing.JButton();
        btnReserved4 = new javax.swing.JButton();
        btnReserved5 = new javax.swing.JButton();
        btnReserved6 = new javax.swing.JButton();
        btnReserved7 = new javax.swing.JButton();
        btnReserved8 = new javax.swing.JButton();
        btnReserved9 = new javax.swing.JButton();
        btnReserved10 = new javax.swing.JButton();
        cbbPredefinedQuerries = new javax.swing.JComboBox();
        lbPredefinedQueries = new javax.swing.JLabel();
        pAgentsManagement = new javax.swing.JPanel();
        tpAgentsGUITab = new javax.swing.JTabbedPane();
        PBVCAgent = new javax.swing.JPanel();
        lbAgentName = new javax.swing.JLabel();
        tfAgentName = new javax.swing.JTextField();
        lbSendTo = new javax.swing.JLabel();
        cbbAgentsList = new javax.swing.JComboBox();
        btnRefresh = new javax.swing.JButton();
        lbMessageType = new javax.swing.JLabel();
        cbbMessageType = new javax.swing.JComboBox();
        lbMessageContents = new javax.swing.JLabel();
        btnCheckMessage = new javax.swing.JButton();
        btnSendMessage = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        taMessageReceived = new javax.swing.JTextArea();
        lbMessageReceived = new javax.swing.JLabel();
        btnLaunchAgent = new javax.swing.JButton();
        spMessageContent = new javax.swing.JScrollPane();
        taMessageContent = new javax.swing.JTextArea();
        jScrollPane5 = new javax.swing.JScrollPane();
        taOnlineHelp = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        pContextByRules = new javax.swing.JPanel();
        label1 = new java.awt.Label();
        jComboBox1 = new javax.swing.JComboBox();
        label2 = new java.awt.Label();
        jScrollPane7 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jScrollPane8 = new javax.swing.JScrollPane();
        jTextArea2 = new javax.swing.JTextArea();
        label4 = new java.awt.Label();
        jScrollPane9 = new javax.swing.JScrollPane();
        jTextArea3 = new javax.swing.JTextArea();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        label5 = new java.awt.Label();
        jScrollPane10 = new javax.swing.JScrollPane();
        jTextArea4 = new javax.swing.JTextArea();
        label6 = new java.awt.Label();
        jButton4 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jButton8 = new javax.swing.JButton();
        jScrollPane11 = new javax.swing.JScrollPane();
        jTextArea5 = new javax.swing.JTextArea();
        label7 = new java.awt.Label();
        jButton5 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        jComboBox2 = new javax.swing.JComboBox();
        label3 = new java.awt.Label();
        jComboBox3 = new javax.swing.JComboBox();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("Form"); // NOI18N

        tpPBVCTabsPanel.setName("tpPBVCTabsPanel"); // NOI18N

        pPlaceManager.setName("pPlaceManager"); // NOI18N

        taMessage1.setName("taMessage1"); // NOI18N

        tfLat.setName("tfLat"); // NOI18N

        lbPlaceCategory.setName("lbPlaceCategory"); // NOI18N
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(placecommframework.PlaceCommFrameworkApp.class).getContext().getResourceMap(PBVC.class);
        lbPlaceCategory.setText(resourceMap.getString("lbPlaceCategory.text")); // NOI18N

        lbTaggedByPeople.setName("lbTaggedByPeople"); // NOI18N
        lbTaggedByPeople.setText(resourceMap.getString("lbTaggedByPeople.text")); // NOI18N

        choicePlaceCategory.setName("choicePlaceCategory"); // NOI18N

        lbTaggedByDevices.setName("lbTaggedByDevices"); // NOI18N
        lbTaggedByDevices.setText(resourceMap.getString("lbTaggedByDevices.text")); // NOI18N

        lbPlaceName.setName("lbPlaceName"); // NOI18N
        lbPlaceName.setText(resourceMap.getString("lbPlaceName.text")); // NOI18N

        lbPlaceTaggedByPeople.setName("lbPlaceTaggedByPeople"); // NOI18N
        lbPlaceTaggedByPeople.setText(resourceMap.getString("lbPlaceTaggedByPeople.text")); // NOI18N

        tfPlaceName.setName("tfPlaceName"); // NOI18N

        lstPeople.setName("lstPeople"); // NOI18N

        lbPlaceMessage.setName("lbPlaceMessage"); // NOI18N
        lbPlaceMessage.setText(resourceMap.getString("lbPlaceMessage.text")); // NOI18N

        lbLongitude.setName("lbLongitude"); // NOI18N
        lbLongitude.setText(resourceMap.getString("lbLongitude.text")); // NOI18N

        lbDiameter.setName("lbDiameter"); // NOI18N
        lbDiameter.setText(resourceMap.getString("lbDiameter.text")); // NOI18N

        tfLon.setName("tfLon"); // NOI18N

        lstTagDevice.setName("lstTagDevice"); // NOI18N

        lbTaggedDevices.setName("lbTaggedDevices"); // NOI18N
        lbTaggedDevices.setText(resourceMap.getString("lbTaggedDevices.text")); // NOI18N

        btnDeletePlace.setLabel(resourceMap.getString("btnDeletePlace.label")); // NOI18N
        btnDeletePlace.setName("btnDeletePlace"); // NOI18N

        btnClose.setLabel(resourceMap.getString("btnClose.label")); // NOI18N
        btnClose.setName("btnClose"); // NOI18N

        tfDiameter.setName("tfDiameter"); // NOI18N

        btnCreatPlace.setLabel(resourceMap.getString("btnCreatPlace.label")); // NOI18N
        btnCreatPlace.setName("btnCreatPlace"); // NOI18N
        btnCreatPlace.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnCreatPlaceMouseClicked(evt);
            }
        });

        lbLatitude.setName("lbLatitude"); // NOI18N
        lbLatitude.setText(resourceMap.getString("lbLatitude.text")); // NOI18N

        javax.swing.GroupLayout pPlaceManagerLayout = new javax.swing.GroupLayout(pPlaceManager);
        pPlaceManager.setLayout(pPlaceManagerLayout);
        pPlaceManagerLayout.setHorizontalGroup(
            pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pPlaceManagerLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pPlaceManagerLayout.createSequentialGroup()
                        .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbPlaceName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbPlaceCategory, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbLatitude, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbLongitude, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbDiameter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfLat, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
                            .addComponent(tfPlaceName, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
                            .addComponent(tfLon, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
                            .addComponent(tfDiameter, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
                            .addComponent(choicePlaceCategory, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)))
                    .addGroup(pPlaceManagerLayout.createSequentialGroup()
                        .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(btnCreatPlace, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pPlaceManagerLayout.createSequentialGroup()
                                .addGap(15, 15, 15)
                                .addComponent(lbTaggedDevices, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(pPlaceManagerLayout.createSequentialGroup()
                                .addComponent(btnDeletePlace, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(btnClose, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(lbTaggedByDevices, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lstTagDevice, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lbTaggedByPeople, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbPlaceMessage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(taMessage1, javax.swing.GroupLayout.DEFAULT_SIZE, 431, Short.MAX_VALUE)
                    .addComponent(lbPlaceTaggedByPeople, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lstPeople, javax.swing.GroupLayout.DEFAULT_SIZE, 431, Short.MAX_VALUE))
                .addContainerGap())
        );
        pPlaceManagerLayout.setVerticalGroup(
            pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pPlaceManagerLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbPlaceMessage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(taMessage1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pPlaceManagerLayout.createSequentialGroup()
                            .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(lbPlaceName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(tfPlaceName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(22, 22, 22)
                            .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(lbPlaceCategory, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(choicePlaceCategory, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(lbLatitude, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(tfLat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(25, 25, 25)
                            .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(lbLongitude, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(tfLon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(lbDiameter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(tfDiameter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(41, 41, 41)
                .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pPlaceManagerLayout.createSequentialGroup()
                        .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbTaggedByPeople, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lstPeople, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lbPlaceTaggedByPeople, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pPlaceManagerLayout.createSequentialGroup()
                        .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbTaggedDevices, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lstTagDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lbTaggedByDevices, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(20, 20, 20)
                .addGroup(pPlaceManagerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnCreatPlace, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDeletePlace, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnClose, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        tpPBVCTabsPanel.addTab(resourceMap.getString("pPlaceManager.TabConstraints.tabTitle"), pPlaceManager); // NOI18N

        pPBVCControlPanel.setName("pPBVCControlPanel"); // NOI18N

        lbStartPlatform.setText(resourceMap.getString("lbStartPlatform.text")); // NOI18N
        lbStartPlatform.setName("lbStartPlatform"); // NOI18N

        btnStartPlatform.setText(resourceMap.getString("btnStartPlatform.text")); // NOI18N
        btnStartPlatform.setName("btnStartPlatform"); // NOI18N
        btnStartPlatform.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnStartPlatformMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnStartPlatformMouseEntered(evt);
            }
        });

        lbStartPBVCAgent.setText(resourceMap.getString("lbStartPBVCAgent.text")); // NOI18N
        lbStartPBVCAgent.setName("lbStartPBVCAgent"); // NOI18N

        btnStartPBVCAgent.setText(resourceMap.getString("btnStartPBVCAgent.text")); // NOI18N
        btnStartPBVCAgent.setName("btnStartPBVCAgent"); // NOI18N
        btnStartPBVCAgent.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnStartPBVCAgentMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnStartPBVCAgentMouseEntered(evt);
            }
        });

        lbStartContextAgent.setText(resourceMap.getString("lbStartContextAgent.text")); // NOI18N
        lbStartContextAgent.setName("lbStartContextAgent"); // NOI18N

        btnStartContextAgent.setText(resourceMap.getString("btnStartContextAgent.text")); // NOI18N
        btnStartContextAgent.setName("btnStartContextAgent"); // NOI18N

        btnStartPlaceAgent.setText(resourceMap.getString("btnStartPlaceAgent.text")); // NOI18N
        btnStartPlaceAgent.setName("btnStartPlaceAgent"); // NOI18N

        lbStartPlaceAgent.setText(resourceMap.getString("lbStartPlaceAgent.text")); // NOI18N
        lbStartPlaceAgent.setName("lbStartPlaceAgent"); // NOI18N

        lbLoadNewAgent.setText(resourceMap.getString("lbLoadNewAgent.text")); // NOI18N
        lbLoadNewAgent.setName("lbLoadNewAgent"); // NOI18N

        btnLoadAgent.setText(resourceMap.getString("btnLoadAgent.text")); // NOI18N
        btnLoadAgent.setName("btnLoadAgent"); // NOI18N

        btnStartSensorAgents.setText(resourceMap.getString("btnStartSensorAgents.text")); // NOI18N
        btnStartSensorAgents.setName("btnStartSensorAgents"); // NOI18N

        lbStartSensorAgent.setText(resourceMap.getString("lbStartSensorAgent.text")); // NOI18N
        lbStartSensorAgent.setName("lbStartSensorAgent"); // NOI18N

        tfAgentJar.setText(resourceMap.getString("tfAgentJar.text")); // NOI18N
        tfAgentJar.setToolTipText(resourceMap.getString("tfAgentJar.toolTipText")); // NOI18N
        tfAgentJar.setName("tfAgentJar"); // NOI18N

        lbSelectAgent.setText(resourceMap.getString("lbSelectAgent.text")); // NOI18N
        lbSelectAgent.setName("lbSelectAgent"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        taMessage.setColumns(20);
        taMessage.setRows(5);
        taMessage.setName("taMessage"); // NOI18N
        jScrollPane1.setViewportView(taMessage);

        cbbAgents.setEditable(true);
        cbbAgents.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Agent1:localhost:1099/JADE", "Agent2:localhost:1099/JADE", "Agent3:localhost:1099/JADE" }));
        cbbAgents.setName("cbbAgents"); // NOI18N

        cbbProtocols.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "WhereAmIGPS", "WhereAmIBT", "WhereAmI", "InsertKB", "ContextPreProcessing", " " }));
        cbbProtocols.setName("cbbProtocols"); // NOI18N

        lbProtocol.setText(resourceMap.getString("lbProtocol.text")); // NOI18N
        lbProtocol.setName("lbProtocol"); // NOI18N

        lbMessages.setText(resourceMap.getString("lbMessages.text")); // NOI18N
        lbMessages.setName("lbMessages"); // NOI18N

        btnComposeMessage.setText(resourceMap.getString("btnComposeMessage.text")); // NOI18N
        btnComposeMessage.setName("btnComposeMessage"); // NOI18N

        btnSend.setText(resourceMap.getString("btnSend.text")); // NOI18N
        btnSend.setName("btnSend"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        taSystemMessage.setColumns(20);
        taSystemMessage.setEditable(false);
        taSystemMessage.setRows(5);
        taSystemMessage.setName("taSystemMessage"); // NOI18N
        jScrollPane2.setViewportView(taSystemMessage);

        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N

        lbSystemMessage.setText(resourceMap.getString("lbSystemMessage.text")); // NOI18N
        lbSystemMessage.setName("lbSystemMessage"); // NOI18N

        btnDummyAgent.setText(resourceMap.getString("btnDummyAgent.text")); // NOI18N
        btnDummyAgent.setName("btnDummyAgent"); // NOI18N
        btnDummyAgent.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnDummyAgentMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout pPBVCControlPanelLayout = new javax.swing.GroupLayout(pPBVCControlPanel);
        pPBVCControlPanel.setLayout(pPBVCControlPanelLayout);
        pPBVCControlPanelLayout.setHorizontalGroup(
            pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                                .addComponent(lbStartContextAgent)
                                .addGap(18, 18, 18)
                                .addComponent(btnStartContextAgent, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                                .addComponent(lbStartSensorAgent)
                                .addGap(18, 18, 18)
                                .addComponent(btnStartSensorAgents, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                                .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbStartPlaceAgent)
                                    .addComponent(lbLoadNewAgent))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
                                .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                                        .addComponent(tfAgentJar)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(btnLoadAgent))
                                    .addComponent(btnStartPlaceAgent, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pPBVCControlPanelLayout.createSequentialGroup()
                                .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbStartPlatform)
                                    .addComponent(lbStartPBVCAgent))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
                                .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(btnStartPBVCAgent, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(btnStartPlatform, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(18, 18, 18)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                                .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbMessages)
                                    .addComponent(lbSelectAgent))
                                .addGap(4, 4, 4))
                            .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                                .addComponent(lbProtocol, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)))
                        .addGap(4, 4, 4)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                                .addComponent(btnComposeMessage)
                                .addGap(18, 18, 18)
                                .addComponent(btnSend))
                            .addComponent(cbbProtocols, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cbbAgents, 0, 225, Short.MAX_VALUE)
                            .addComponent(jScrollPane1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnDummyAgent))
                    .addComponent(lbSystemMessage)
                    .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                        .addGap(352, 352, 352)
                        .addComponent(jButton1))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 1048, Short.MAX_VALUE))
                .addContainerGap())
        );
        pPBVCControlPanelLayout.setVerticalGroup(
            pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbStartPlatform)
                            .addComponent(btnStartPlatform))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbStartPBVCAgent)
                            .addComponent(btnStartPBVCAgent))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbStartContextAgent)
                            .addComponent(btnStartContextAgent))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbStartPlaceAgent)
                            .addComponent(btnStartPlaceAgent))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbLoadNewAgent)
                            .addComponent(btnLoadAgent)
                            .addComponent(tfAgentJar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbStartSensorAgent)
                            .addComponent(btnStartSensorAgents))
                        .addGap(15, 15, 15)
                        .addComponent(lbSystemMessage))
                    .addGroup(pPBVCControlPanelLayout.createSequentialGroup()
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbSelectAgent)
                            .addComponent(cbbAgents, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnDummyAgent))
                        .addGap(11, 11, 11)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbbProtocols, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbProtocol))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbMessages)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pPBVCControlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnComposeMessage)
                            .addComponent(btnSend))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton1)
                .addContainerGap(204, Short.MAX_VALUE))
        );

        tpPBVCTabsPanel.addTab(resourceMap.getString("pPBVCControlPanel.TabConstraints.tabTitle"), pPBVCControlPanel); // NOI18N

        pQueryBuilder.setName("pQueryBuilder"); // NOI18N

        lbPrefix.setText(resourceMap.getString("lbPrefix.text")); // NOI18N
        lbPrefix.setName("lbPrefix"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        lstPrefix.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "PREFIX plc:<http://www.tuannguyen.mobi/ontologies/pbvc/2009/4/place.owl#>", "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>", "PREFIX swrl:<http://www.w3.org/2003/11/swrl#>", "PREFIX protege:<http://protege.stanford.edu/plugins/owl/protege#>", "PREFIX foaf:<http://xmlns.com/foaf/0.1/>", "PREFIX dev:<http://www.tuannguyen.mobi/ontologies/pbvc/2009/4/device.owl#>", "PREFIX xsp:<http://www.owl-ontologies.com/2005/08/07/xsp.owl#>", "PREFIX swrlb:<http://www.w3.org/2003/11/swrlb#>", "PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>", "PREFIX owl:<http://www.w3.org/2002/07/owl#>", "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>", "PREFIX pbvc:<http://www.tuannguyen.mobi/ontologies/pbvc/2009/4/pbvc.owl#>" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        lstPrefix.setName("lstPrefix"); // NOI18N
        jScrollPane3.setViewportView(lstPrefix);

        lbWhere.setText(resourceMap.getString("lbWhere.text")); // NOI18N
        lbWhere.setName("lbWhere"); // NOI18N

        tfSubject.setText(resourceMap.getString("tfSubject.text")); // NOI18N
        tfSubject.setName("tfSubject"); // NOI18N

        cbbPredicate.setEditable(true);
        cbbPredicate.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "rdfs:", "swrl:", "protege:", "foaf:", "dev:", "xsp:", "swrlb:", "xsd:", "owl:", "rdf:", "pbvc:", "plc:" }));
        cbbPredicate.setName("cbbPredicate"); // NOI18N

        tfObject.setText(resourceMap.getString("tfObject.text")); // NOI18N
        tfObject.setName("tfObject"); // NOI18N

        lbFilter.setText(resourceMap.getString("lbFilter.text")); // NOI18N
        lbFilter.setName("lbFilter"); // NOI18N

        tfFilter.setText(resourceMap.getString("tfFilter.text")); // NOI18N
        tfFilter.setName("tfFilter"); // NOI18N

        cbTimeConcerns.setSelected(true);
        cbTimeConcerns.setText(resourceMap.getString("cbTimeConcerns.text")); // NOI18N
        cbTimeConcerns.setName("cbTimeConcerns"); // NOI18N

        tfTimestamp2.setText(resourceMap.getString("tfTimestamp2.text")); // NOI18N
        tfTimestamp2.setName("tfTimestamp2"); // NOI18N

        tfTimestamp1.setText(resourceMap.getString("tfTimestamp1.text")); // NOI18N
        tfTimestamp1.setName("tfTimestamp1"); // NOI18N

        lbTimestamp1.setText(resourceMap.getString("lbTimestamp1.text")); // NOI18N
        lbTimestamp1.setName("lbTimestamp1"); // NOI18N

        lbTimestamp2.setText(resourceMap.getString("lbTimestamp2.text")); // NOI18N
        lbTimestamp2.setName("lbTimestamp2"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        taSPARQL.setColumns(20);
        taSPARQL.setRows(5);
        taSPARQL.setName("taSPARQL"); // NOI18N
        jScrollPane4.setViewportView(taSPARQL);

        btnGenerateSPARQL.setText(resourceMap.getString("btnGenerateSPARQL.text")); // NOI18N
        btnGenerateSPARQL.setName("btnGenerateSPARQL"); // NOI18N
        btnGenerateSPARQL.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnGenerateSPARQLMouseClicked(evt);
            }
        });

        btnParseSPARQL.setText(resourceMap.getString("btnParseSPARQL.text")); // NOI18N
        btnParseSPARQL.setName("btnParseSPARQL"); // NOI18N
        btnParseSPARQL.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnParseSPARQLMouseClicked(evt);
            }
        });

        btnExecute.setText(resourceMap.getString("btnExecute.text")); // NOI18N
        btnExecute.setName("btnExecute"); // NOI18N
        btnExecute.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnExecuteMouseClicked(evt);
            }
        });

        tfSelect.setText(resourceMap.getString("tfSelect.text")); // NOI18N
        tfSelect.setName("tfSelect"); // NOI18N

        lbSelect.setText(resourceMap.getString("lbSelect.text")); // NOI18N
        lbSelect.setName("lbSelect"); // NOI18N

        lbWhere1.setText(resourceMap.getString("lbWhere1.text")); // NOI18N
        lbWhere1.setName("lbWhere1"); // NOI18N

        tfSubject1.setText(resourceMap.getString("tfSubject1.text")); // NOI18N
        tfSubject1.setName("tfSubject1"); // NOI18N

        cbbPredicate1.setEditable(true);
        cbbPredicate1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "rdfs:", "swrl:", "protege:", "foaf:", "dev:", "xsp:", "swrlb:", "xsd:", "owl:", "rdf:", "pbvc:", "plc:" }));
        cbbPredicate1.setName("cbbPredicate1"); // NOI18N

        tfObject1.setText(resourceMap.getString("tfObject1.text")); // NOI18N
        tfObject1.setName("tfObject1"); // NOI18N

        lbWhere2.setText(resourceMap.getString("lbWhere2.text")); // NOI18N
        lbWhere2.setName("lbWhere2"); // NOI18N

        tfSubject2.setText(resourceMap.getString("tfSubject2.text")); // NOI18N
        tfSubject2.setName("tfSubject2"); // NOI18N

        cbbPredicate2.setEditable(true);
        cbbPredicate2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "rdfs:", "swrl:", "protege:", "foaf:", "dev:", "xsp:", "swrlb:", "xsd:", "owl:", "rdf:", "pbvc:", "plc:" }));
        cbbPredicate2.setName("cbbPredicate2"); // NOI18N

        tfObject2.setText(resourceMap.getString("tfObject2.text")); // NOI18N
        tfObject2.setName("tfObject2"); // NOI18N

        lbWhere3.setText(resourceMap.getString("lbWhere3.text")); // NOI18N
        lbWhere3.setName("lbWhere3"); // NOI18N

        tfSubject3.setText(resourceMap.getString("tfSubject3.text")); // NOI18N
        tfSubject3.setName("tfSubject3"); // NOI18N

        cbbPredicate3.setEditable(true);
        cbbPredicate3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "rdfs:", "swrl:", "protege:", "foaf:", "dev:", "xsp:", "swrlb:", "xsd:", "owl:", "rdf:", "pbvc:", "plc:" }));
        cbbPredicate3.setName("cbbPredicate3"); // NOI18N

        tfObject3.setText(resourceMap.getString("tfObject3.text")); // NOI18N
        tfObject3.setName("tfObject3"); // NOI18N

        lbWhere4.setText(resourceMap.getString("lbWhere4.text")); // NOI18N
        lbWhere4.setName("lbWhere4"); // NOI18N

        tfSubject4.setText(resourceMap.getString("tfSubject4.text")); // NOI18N
        tfSubject4.setName("tfSubject4"); // NOI18N

        cbbPredicate4.setEditable(true);
        cbbPredicate4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "rdfs:", "swrl:", "protege:", "foaf:", "dev:", "xsp:", "swrlb:", "xsd:", "owl:", "rdf:", "pbvc:", "plc:" }));
        cbbPredicate4.setName("cbbPredicate4"); // NOI18N

        tfObject4.setText(resourceMap.getString("tfObject4.text")); // NOI18N
        tfObject4.setName("tfObject4"); // NOI18N

        btnClear.setText(resourceMap.getString("btnClear.text")); // NOI18N
        btnClear.setName("btnClear"); // NOI18N
        btnClear.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnClearMouseClicked(evt);
            }
        });

        btnReserved.setText(resourceMap.getString("btnReserved.text")); // NOI18N
        btnReserved.setName("btnReserved"); // NOI18N
        btnReserved.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnReservedMouseClicked(evt);
            }
        });

        btnReserved4.setText(resourceMap.getString("btnReserved4.text")); // NOI18N
        btnReserved4.setName("btnReserved4"); // NOI18N

        btnReserved5.setText(resourceMap.getString("btnReserved5.text")); // NOI18N
        btnReserved5.setName("btnReserved5"); // NOI18N

        btnReserved6.setText(resourceMap.getString("btnReserved6.text")); // NOI18N
        btnReserved6.setName("btnReserved6"); // NOI18N

        btnReserved7.setText(resourceMap.getString("btnReserved7.text")); // NOI18N
        btnReserved7.setName("btnReserved7"); // NOI18N

        btnReserved8.setText(resourceMap.getString("btnReserved8.text")); // NOI18N
        btnReserved8.setName("btnReserved8"); // NOI18N

        btnReserved9.setText(resourceMap.getString("btnReserved9.text")); // NOI18N
        btnReserved9.setName("btnReserved9"); // NOI18N

        btnReserved10.setText(resourceMap.getString("btnReserved10.text")); // NOI18N
        btnReserved10.setName("btnReserved10"); // NOI18N

        cbbPredefinedQuerries.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Where are my friends?", "Where are my devices? ", "Who is PersonX? ", "Where is PersonX last week? ", "What services are here? ", "What services related to my context?" }));
        cbbPredefinedQuerries.setName("cbbPredefinedQuerries"); // NOI18N

        lbPredefinedQueries.setText(resourceMap.getString("lbPredefinedQueries.text")); // NOI18N
        lbPredefinedQueries.setName("lbPredefinedQueries"); // NOI18N

        javax.swing.GroupLayout pQueryBuilderLayout = new javax.swing.GroupLayout(pQueryBuilder);
        pQueryBuilder.setLayout(pQueryBuilderLayout);
        pQueryBuilderLayout.setHorizontalGroup(
            pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pQueryBuilderLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pQueryBuilderLayout.createSequentialGroup()
                        .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(lbWhere)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(tfSubject, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cbbPredicate, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tfObject, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(lbSelect)
                                .addGap(8, 8, 8)
                                .addComponent(tfSelect, javax.swing.GroupLayout.DEFAULT_SIZE, 583, Short.MAX_VALUE)))
                        .addGap(431, 431, 431))
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addComponent(lbWhere1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tfSubject1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbbPredicate1, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfObject1, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE)
                        .addGap(431, 431, 431))
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addComponent(lbWhere2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tfSubject2, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbbPredicate2, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfObject2, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE)
                        .addGap(431, 431, 431))
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addComponent(lbWhere3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tfSubject3, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbbPredicate3, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfObject3, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE)
                        .addGap(431, 431, 431))
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addComponent(lbWhere4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tfSubject4, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbbPredicate4, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfObject4, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE)
                        .addGap(431, 431, 431))
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(cbTimeConcerns)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbTimestamp1)
                                    .addComponent(tfTimestamp1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                                        .addComponent(tfTimestamp2, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                                    .addComponent(lbTimestamp2)))
                            .addGroup(pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(lbFilter)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(tfFilter, javax.swing.GroupLayout.DEFAULT_SIZE, 582, Short.MAX_VALUE)))
                        .addGap(432, 432, 432))
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(lbPrefix)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 1048, Short.MAX_VALUE))
                        .addContainerGap())
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(btnReserved)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnReserved7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnReserved6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(btnReserved8))
                            .addGroup(pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(btnReserved4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnReserved5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnReserved10)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(btnReserved9))
                            .addGroup(pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(btnGenerateSPARQL)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(btnParseSPARQL)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnExecute)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnClear))
                            .addGroup(pQueryBuilderLayout.createSequentialGroup()
                                .addComponent(lbPredefinedQueries)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cbbPredefinedQuerries, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap(607, Short.MAX_VALUE))))
        );
        pQueryBuilderLayout.setVerticalGroup(
            pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pQueryBuilderLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbPrefix)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfSelect, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbSelect))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbWhere)
                    .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(tfSubject, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbbPredicate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(tfObject, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbWhere1)
                    .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(tfSubject1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbbPredicate1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(tfObject1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbWhere2)
                    .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(tfSubject2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbbPredicate2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(tfObject2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbWhere3)
                    .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(tfSubject3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbbPredicate3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(tfObject3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbWhere4)
                    .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(tfSubject4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbbPredicate4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(tfObject4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbFilter)
                    .addComponent(tfFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addGap(19, 19, 19)
                        .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(tfTimestamp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbTimeConcerns)))
                    .addGroup(pQueryBuilderLayout.createSequentialGroup()
                        .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbTimestamp1)
                            .addComponent(lbTimestamp2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfTimestamp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbPredefinedQueries)
                    .addComponent(cbbPredefinedQuerries, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnGenerateSPARQL)
                    .addComponent(btnParseSPARQL)
                    .addComponent(btnExecute)
                    .addComponent(btnClear))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnReserved)
                    .addComponent(btnReserved7)
                    .addComponent(btnReserved6)
                    .addComponent(btnReserved8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pQueryBuilderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnReserved4)
                    .addComponent(btnReserved5)
                    .addComponent(btnReserved9)
                    .addComponent(btnReserved10))
                .addContainerGap())
        );

        tpPBVCTabsPanel.addTab(resourceMap.getString("pQueryBuilder.TabConstraints.tabTitle"), pQueryBuilder); // NOI18N

        pAgentsManagement.setName("pAgentsManagement"); // NOI18N

        tpAgentsGUITab.setName("tpAgentsGUITab"); // NOI18N

        PBVCAgent.setName("PBVCAgent"); // NOI18N

        lbAgentName.setText(resourceMap.getString("lbAgentName.text")); // NOI18N
        lbAgentName.setName("lbAgentName"); // NOI18N

        tfAgentName.setText(resourceMap.getString("tfAgentName.text")); // NOI18N
        tfAgentName.setName("tfAgentName"); // NOI18N

        lbSendTo.setText(resourceMap.getString("lbSendTo.text")); // NOI18N
        lbSendTo.setName("lbSendTo"); // NOI18N

        cbbAgentsList.setEditable(true);
        cbbAgentsList.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Agent1@localhost:1099/JADE", "Agent2@localhost:1099/JADE", "Agent3@localhost:1099/JADE", "Agent4@localhost:1099/JADE" }));
        cbbAgentsList.setName("cbbAgentsList"); // NOI18N

        btnRefresh.setText(resourceMap.getString("btnRefresh.text")); // NOI18N
        btnRefresh.setName("btnRefresh"); // NOI18N
        btnRefresh.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnRefreshMouseClicked(evt);
            }
        });

        lbMessageType.setText(resourceMap.getString("lbMessageType.text")); // NOI18N
        lbMessageType.setName("lbMessageType"); // NOI18N

        cbbMessageType.setEditable(true);
        cbbMessageType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "INFORM", "WHEREAMIGPS", "WHEREAMIBT", "WHEREAMI" }));
        cbbMessageType.setName("cbbMessageType"); // NOI18N

        lbMessageContents.setText(resourceMap.getString("lbMessageContents.text")); // NOI18N
        lbMessageContents.setName("lbMessageContents"); // NOI18N

        btnCheckMessage.setText(resourceMap.getString("btnCheckMessage.text")); // NOI18N
        btnCheckMessage.setName("btnCheckMessage"); // NOI18N
        btnCheckMessage.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnCheckMessageMouseClicked(evt);
            }
        });

        btnSendMessage.setText(resourceMap.getString("btnSendMessage.text")); // NOI18N
        btnSendMessage.setName("btnSendMessage"); // NOI18N
        btnSendMessage.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnSendMessageMouseClicked(evt);
            }
        });

        jScrollPane6.setName("jScrollPane6"); // NOI18N

        taMessageReceived.setColumns(20);
        taMessageReceived.setRows(5);
        taMessageReceived.setName("taMessageReceived"); // NOI18N
        jScrollPane6.setViewportView(taMessageReceived);

        lbMessageReceived.setText(resourceMap.getString("lbMessageReceived.text")); // NOI18N
        lbMessageReceived.setName("lbMessageReceived"); // NOI18N

        btnLaunchAgent.setText(resourceMap.getString("btnLaunchAgent.text")); // NOI18N
        btnLaunchAgent.setName("btnLaunchAgent"); // NOI18N
        btnLaunchAgent.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnLaunchAgentMouseClicked(evt);
            }
        });

        spMessageContent.setName("spMessageContent"); // NOI18N

        taMessageContent.setColumns(20);
        taMessageContent.setRows(5);
        taMessageContent.setName("taMessageContent"); // NOI18N
        spMessageContent.setViewportView(taMessageContent);

        jScrollPane5.setName("jScrollPane5"); // NOI18N

        taOnlineHelp.setColumns(20);
        taOnlineHelp.setEditable(false);
        taOnlineHelp.setRows(5);
        taOnlineHelp.setName("taOnlineHelp"); // NOI18N
        jScrollPane5.setViewportView(taOnlineHelp);

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        javax.swing.GroupLayout PBVCAgentLayout = new javax.swing.GroupLayout(PBVCAgent);
        PBVCAgent.setLayout(PBVCAgentLayout);
        PBVCAgentLayout.setHorizontalGroup(
            PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PBVCAgentLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane6)
                    .addGroup(PBVCAgentLayout.createSequentialGroup()
                        .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbAgentName)
                            .addComponent(lbSendTo)
                            .addComponent(lbMessageType))
                        .addGap(8, 8, 8)
                        .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tfAgentName, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                            .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(cbbAgentsList, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, PBVCAgentLayout.createSequentialGroup()
                                    .addGap(2, 2, 2)
                                    .addComponent(cbbMessageType, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnLaunchAgent)
                            .addComponent(btnRefresh))
                        .addGap(4, 4, 4))
                    .addComponent(lbMessageContents)
                    .addGroup(PBVCAgentLayout.createSequentialGroup()
                        .addComponent(btnCheckMessage)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnSendMessage))
                    .addComponent(lbMessageReceived)
                    .addComponent(spMessageContent))
                .addGap(57, 57, 57)
                .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 608, Short.MAX_VALUE))
                .addContainerGap())
        );
        PBVCAgentLayout.setVerticalGroup(
            PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PBVCAgentLayout.createSequentialGroup()
                .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, PBVCAgentLayout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, PBVCAgentLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(PBVCAgentLayout.createSequentialGroup()
                                .addComponent(lbAgentName)
                                .addGap(23, 23, 23)
                                .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lbSendTo)
                                    .addComponent(cbbAgentsList, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(btnRefresh)))
                            .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(tfAgentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(btnLaunchAgent)))
                        .addGap(20, 20, 20)
                        .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbMessageType)
                            .addComponent(cbbMessageType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(lbMessageContents)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(spMessageContent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(PBVCAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnCheckMessage)
                            .addComponent(btnSendMessage))
                        .addGap(24, 24, 24)
                        .addComponent(lbMessageReceived)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(160, Short.MAX_VALUE))
        );

        tpAgentsGUITab.addTab(resourceMap.getString("PBVCAgent.TabConstraints.tabTitle"), PBVCAgent); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1043, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 579, Short.MAX_VALUE)
        );

        tpAgentsGUITab.addTab("tab2", jPanel2);

        javax.swing.GroupLayout pAgentsManagementLayout = new javax.swing.GroupLayout(pAgentsManagement);
        pAgentsManagement.setLayout(pAgentsManagementLayout);
        pAgentsManagementLayout.setHorizontalGroup(
            pAgentsManagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pAgentsManagementLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tpAgentsGUITab, javax.swing.GroupLayout.DEFAULT_SIZE, 1048, Short.MAX_VALUE)
                .addContainerGap())
        );
        pAgentsManagementLayout.setVerticalGroup(
            pAgentsManagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pAgentsManagementLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tpAgentsGUITab, javax.swing.GroupLayout.DEFAULT_SIZE, 607, Short.MAX_VALUE)
                .addContainerGap())
        );

        tpPBVCTabsPanel.addTab(resourceMap.getString("pAgentsManagement.TabConstraints.tabTitle"), pAgentsManagement); // NOI18N

        pContextByRules.setName("pContextByRules"); // NOI18N

        label1.setName("label1"); // NOI18N
        label1.setText(resourceMap.getString("label1.text")); // NOI18N

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SPARQL", "SeRQL" }));
        jComboBox1.setName("jComboBox1"); // NOI18N

        label2.setName("label2"); // NOI18N
        label2.setText(resourceMap.getString("label2.text")); // NOI18N

        jScrollPane7.setName("jScrollPane7"); // NOI18N

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jTextArea1.setName("jTextArea1"); // NOI18N
        jScrollPane7.setViewportView(jTextArea1);

        jScrollPane8.setName("jScrollPane8"); // NOI18N

        jTextArea2.setColumns(20);
        jTextArea2.setRows(5);
        jTextArea2.setText(resourceMap.getString("jTextArea2.text")); // NOI18N
        jTextArea2.setName("jTextArea2"); // NOI18N
        jScrollPane8.setViewportView(jTextArea2);

        label4.setName("label4"); // NOI18N
        label4.setText(resourceMap.getString("label4.text")); // NOI18N

        jScrollPane9.setName("jScrollPane9"); // NOI18N

        jTextArea3.setColumns(20);
        jTextArea3.setRows(5);
        jTextArea3.setText(resourceMap.getString("jTextArea3.text")); // NOI18N
        jTextArea3.setName("jTextArea3"); // NOI18N
        jScrollPane9.setViewportView(jTextArea3);

        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N

        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N

        label5.setName("label5"); // NOI18N
        label5.setText(resourceMap.getString("label5.text")); // NOI18N

        jScrollPane10.setName("jScrollPane10"); // NOI18N

        jTextArea4.setColumns(20);
        jTextArea4.setRows(5);
        jTextArea4.setText(resourceMap.getString("jTextArea4.text")); // NOI18N
        jTextArea4.setName("jTextArea4"); // NOI18N
        jScrollPane10.setViewportView(jTextArea4);

        label6.setName("label6"); // NOI18N
        label6.setText(resourceMap.getString("label6.text")); // NOI18N

        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N

        jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N
        jButton6.setName("jButton6"); // NOI18N

        jButton7.setText(resourceMap.getString("jButton7.text")); // NOI18N
        jButton7.setName("jButton7"); // NOI18N

        jButton8.setText(resourceMap.getString("jButton8.text")); // NOI18N
        jButton8.setName("jButton8"); // NOI18N

        jScrollPane11.setName("jScrollPane11"); // NOI18N

        jTextArea5.setColumns(20);
        jTextArea5.setRows(5);
        jTextArea5.setText(resourceMap.getString("jTextArea5.text")); // NOI18N
        jTextArea5.setName("jTextArea5"); // NOI18N
        jScrollPane11.setViewportView(jTextArea5);

        label7.setName("label7"); // NOI18N
        label7.setText(resourceMap.getString("label7.text")); // NOI18N

        jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N
        jButton5.setName("jButton5"); // NOI18N

        jButton9.setText(resourceMap.getString("jButton9.text")); // NOI18N
        jButton9.setName("jButton9"); // NOI18N

        jButton10.setText(resourceMap.getString("jButton10.text")); // NOI18N
        jButton10.setName("jButton10"); // NOI18N

        jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Rule 1: Name", "Rule 2: Name", "Rule 3: Name" }));
        jComboBox2.setName("jComboBox2"); // NOI18N

        label3.setName("label3"); // NOI18N
        label3.setText(resourceMap.getString("label3.text")); // NOI18N

        jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "What places " }));
        jComboBox3.setName("jComboBox3"); // NOI18N

        javax.swing.GroupLayout pContextByRulesLayout = new javax.swing.GroupLayout(pContextByRules);
        pContextByRules.setLayout(pContextByRulesLayout);
        pContextByRulesLayout.setHorizontalGroup(
            pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pContextByRulesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(pContextByRulesLayout.createSequentialGroup()
                                .addComponent(jButton8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jButton6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButton4))
                            .addComponent(jScrollPane10, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane8, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE)))
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBox3, 0, 348, Short.MAX_VALUE)
                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(18, 18, 18)
                .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addComponent(jButton5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton9)
                        .addGap(248, 248, 248))
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 464, Short.MAX_VALUE)
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 464, Short.MAX_VALUE)
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addComponent(jButton2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 300, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jComboBox2, 0, 464, Short.MAX_VALUE))
                .addContainerGap())
        );
        pContextByRulesLayout.setVerticalGroup(
            pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pContextByRulesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(24, 24, 24)
                .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pContextByRulesLayout.createSequentialGroup()
                                .addGap(16, 16, 16)
                                .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pContextByRulesLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton2)
                            .addComponent(jButton3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jButton4)
                                .addComponent(jButton6))
                            .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jButton8)
                                .addComponent(jButton7))))
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pContextByRulesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton5)
                            .addComponent(jButton9)))
                    .addGroup(pContextByRulesLayout.createSequentialGroup()
                        .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28)
                        .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(67, Short.MAX_VALUE))
        );

        label5.getAccessibleContext().setAccessibleName(resourceMap.getString("label5.AccessibleContext.accessibleName")); // NOI18N
        label7.getAccessibleContext().setAccessibleName(resourceMap.getString("label7.AccessibleContext.accessibleName")); // NOI18N

        tpPBVCTabsPanel.addTab(resourceMap.getString("pContextByRules.TabConstraints.tabTitle"), pContextByRules); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(tpPBVCTabsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 1073, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tpPBVCTabsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 657, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnCreatPlaceMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCreatPlaceMouseClicked
        // TODO add your handling code here:
}//GEN-LAST:event_btnCreatPlaceMouseClicked

    private void btnStartPlatformMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnStartPlatformMouseEntered
        // TODO add your handling code here:
        taSystemMessage.setText("btnStartPlatformMouseEntered");
    }//GEN-LAST:event_btnStartPlatformMouseEntered

    private void btnStartPBVCAgentMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnStartPBVCAgentMouseEntered
        // TODO add your handling code here:
        taSystemMessage.setText("btnStartPlatform1MouseEntered");
    }//GEN-LAST:event_btnStartPBVCAgentMouseEntered

    private void btnStartPlatformMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnStartPlatformMouseClicked
        // TODO add your handling code here:
        try {
                System.out.println("Start Leap AGENT");
                String[] myargs= {"-host 131.172.40.173","-port 1099"};
                //MicroBoot.main(myargs);
                //MicroRuntime.startAgent("Hulala", "pbvcplugin.examples.Hola", null);
                //System.out.println("Agent started");
        }
        catch (Exception ex) {
             System.out.println("Failed to start agent:"+ex);
             taSystemMessage.setText("Failed to start agent:"+ex);

        }
    }//GEN-LAST:event_btnStartPlatformMouseClicked

    private void btnStartPBVCAgentMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnStartPBVCAgentMouseClicked
        // TODO add your handling code here:
        try {
                System.out.println("Start Leap PBVC Agent");
                String[] myargs= {"-host localhost","-port 1099"};
                MicroBoot.main(myargs);
                MicroRuntime.startAgent("PBVCAgent", "pbvcplugin.PbvcAgent", null);
        }
        catch (Exception ex) {
             System.out.println("Failed to start agent:"+ex);

        }

    }//GEN-LAST:event_btnStartPBVCAgentMouseClicked

    private void btnDummyAgentMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnDummyAgentMouseClicked
        // TODO add your handling code here:
        try {
                System.out.println("Start Dummny Agent");
                String[] myargs= {"-host localhost","-port 1099"};
                MicroBoot.main(myargs);
                MicroRuntime.startAgent("DummyAgent", "jade.tools.DummyAgent", null);
        }
        catch (Exception ex) {
             System.out.println("Failed to start agent:"+ex);

        }
    }//GEN-LAST:event_btnDummyAgentMouseClicked

    private void btnRefreshMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnRefreshMouseClicked
        // TODO add your handling code here:
        // Connect to AMS get the agent list and post to the cbbBox
        cbbAgentsList.removeAllItems();
        cbbAgentsList.insertItemAt("Agent name test", 0);
        
    }//GEN-LAST:event_btnRefreshMouseClicked

    private void btnLaunchAgentMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnLaunchAgentMouseClicked
        // TODO add your handling code here:
        try {
            String sAgentName=tfAgentName.getText();
            System.out.println("Start " + sAgentName +" Agent");
            String[] myargs= {"-host localhost","-port 1099"};
            MicroBoot.main(myargs);
            MicroRuntime.startAgent(sAgentName, "pbvcprotegeplugin.agents.PBVCAgent", null);
        }
        catch (Exception ex) {
             System.out.println("Failed to start agent:"+ex);

        }
    }//GEN-LAST:event_btnLaunchAgentMouseClicked

    private void btnParseSPARQLMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnParseSPARQLMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btnParseSPARQLMouseClicked

    private void btnGenerateSPARQLMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnGenerateSPARQLMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btnGenerateSPARQLMouseClicked

    private void btnExecuteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnExecuteMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btnExecuteMouseClicked

    private void btnCheckMessageMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCheckMessageMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btnCheckMessageMouseClicked

    private void btnSendMessageMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSendMessageMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSendMessageMouseClicked

    private void btnClearMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnClearMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btnClearMouseClicked

    private void btnReservedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnReservedMouseClicked
        // TODO add your handling code here:
        //Execute RQL and SeRQL queries on a Jena model from your code (Sesame-transparent)
        //Almost identical to executing RDQL queries:


        

    }//GEN-LAST:event_btnReservedMouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                PBVC dialog = new PBVC(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel PBVCAgent;
    private javax.swing.JButton btnCheckMessage;
    private javax.swing.JToggleButton btnClear;
    private java.awt.Button btnClose;
    private javax.swing.JButton btnComposeMessage;
    private java.awt.Button btnCreatPlace;
    private java.awt.Button btnDeletePlace;
    private javax.swing.JButton btnDummyAgent;
    private javax.swing.JButton btnExecute;
    private javax.swing.JButton btnGenerateSPARQL;
    private javax.swing.JButton btnLaunchAgent;
    private javax.swing.JButton btnLoadAgent;
    private javax.swing.JButton btnParseSPARQL;
    private javax.swing.JButton btnRefresh;
    private javax.swing.JButton btnReserved;
    private javax.swing.JButton btnReserved10;
    private javax.swing.JButton btnReserved4;
    private javax.swing.JButton btnReserved5;
    private javax.swing.JButton btnReserved6;
    private javax.swing.JButton btnReserved7;
    private javax.swing.JButton btnReserved8;
    private javax.swing.JButton btnReserved9;
    private javax.swing.JButton btnSend;
    private javax.swing.JButton btnSendMessage;
    private javax.swing.JButton btnStartContextAgent;
    private javax.swing.JButton btnStartPBVCAgent;
    private javax.swing.JButton btnStartPlaceAgent;
    private javax.swing.JButton btnStartPlatform;
    private javax.swing.JButton btnStartSensorAgents;
    private javax.swing.JCheckBox cbTimeConcerns;
    private javax.swing.JComboBox cbbAgents;
    private javax.swing.JComboBox cbbAgentsList;
    private javax.swing.JComboBox cbbMessageType;
    private javax.swing.JComboBox cbbPredefinedQuerries;
    private javax.swing.JComboBox cbbPredicate;
    private javax.swing.JComboBox cbbPredicate1;
    private javax.swing.JComboBox cbbPredicate2;
    private javax.swing.JComboBox cbbPredicate3;
    private javax.swing.JComboBox cbbPredicate4;
    private javax.swing.JComboBox cbbProtocols;
    private java.awt.Choice choicePlaceCategory;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JComboBox jComboBox3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextArea jTextArea2;
    private javax.swing.JTextArea jTextArea3;
    private javax.swing.JTextArea jTextArea4;
    private javax.swing.JTextArea jTextArea5;
    private java.awt.Label label1;
    private java.awt.Label label2;
    private java.awt.Label label3;
    private java.awt.Label label4;
    private java.awt.Label label5;
    private java.awt.Label label6;
    private java.awt.Label label7;
    private javax.swing.JLabel lbAgentName;
    private java.awt.Label lbDiameter;
    private javax.swing.JLabel lbFilter;
    private java.awt.Label lbLatitude;
    private javax.swing.JLabel lbLoadNewAgent;
    private java.awt.Label lbLongitude;
    private javax.swing.JLabel lbMessageContents;
    private javax.swing.JLabel lbMessageReceived;
    private javax.swing.JLabel lbMessageType;
    private javax.swing.JLabel lbMessages;
    private java.awt.Label lbPlaceCategory;
    private java.awt.Label lbPlaceMessage;
    private java.awt.Label lbPlaceName;
    private java.awt.Label lbPlaceTaggedByPeople;
    private javax.swing.JLabel lbPredefinedQueries;
    private javax.swing.JLabel lbPrefix;
    private javax.swing.JLabel lbProtocol;
    private javax.swing.JLabel lbSelect;
    private javax.swing.JLabel lbSelectAgent;
    private javax.swing.JLabel lbSendTo;
    private javax.swing.JLabel lbStartContextAgent;
    private javax.swing.JLabel lbStartPBVCAgent;
    private javax.swing.JLabel lbStartPlaceAgent;
    private javax.swing.JLabel lbStartPlatform;
    private javax.swing.JLabel lbStartSensorAgent;
    private javax.swing.JLabel lbSystemMessage;
    private java.awt.Label lbTaggedByDevices;
    private java.awt.Label lbTaggedByPeople;
    private java.awt.Label lbTaggedDevices;
    private javax.swing.JLabel lbTimestamp1;
    private javax.swing.JLabel lbTimestamp2;
    private javax.swing.JLabel lbWhere;
    private javax.swing.JLabel lbWhere1;
    private javax.swing.JLabel lbWhere2;
    private javax.swing.JLabel lbWhere3;
    private javax.swing.JLabel lbWhere4;
    private java.awt.List lstPeople;
    private javax.swing.JList lstPrefix;
    private java.awt.List lstTagDevice;
    private javax.swing.JPanel pAgentsManagement;
    private javax.swing.JPanel pContextByRules;
    private javax.swing.JPanel pPBVCControlPanel;
    private javax.swing.JPanel pPlaceManager;
    private javax.swing.JPanel pQueryBuilder;
    private javax.swing.JScrollPane spMessageContent;
    private javax.swing.JTextArea taMessage;
    private java.awt.TextArea taMessage1;
    private javax.swing.JTextArea taMessageContent;
    private javax.swing.JTextArea taMessageReceived;
    private javax.swing.JTextArea taOnlineHelp;
    private javax.swing.JTextArea taSPARQL;
    private javax.swing.JTextArea taSystemMessage;
    private javax.swing.JTextField tfAgentJar;
    private javax.swing.JTextField tfAgentName;
    private java.awt.TextField tfDiameter;
    private javax.swing.JTextField tfFilter;
    private java.awt.TextField tfLat;
    private java.awt.TextField tfLon;
    private javax.swing.JTextField tfObject;
    private javax.swing.JTextField tfObject1;
    private javax.swing.JTextField tfObject2;
    private javax.swing.JTextField tfObject3;
    private javax.swing.JTextField tfObject4;
    private java.awt.TextField tfPlaceName;
    private javax.swing.JTextField tfSelect;
    private javax.swing.JTextField tfSubject;
    private javax.swing.JTextField tfSubject1;
    private javax.swing.JTextField tfSubject2;
    private javax.swing.JTextField tfSubject3;
    private javax.swing.JTextField tfSubject4;
    private javax.swing.JTextField tfTimestamp1;
    private javax.swing.JTextField tfTimestamp2;
    private javax.swing.JTabbedPane tpAgentsGUITab;
    private javax.swing.JTabbedPane tpPBVCTabsPanel;
    // End of variables declaration//GEN-END:variables

}
